//2009/07/27 12:28:30
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

class WidgetRepairs
{
public:
    int days(vector <int> arrivals, int numPerDay)
    {
		int days = 0;
		int mount = 0;
		for(int i=0; i<arrivals.size(); i++)
		{
			if(arrivals[i] + mount == 0)
				continue;
			mount = max(mount + arrivals[i] - numPerDay, 0);
			days++;
		}
		if(mount % numPerDay >0)
			days += (int)(mount/numPerDay) + 1;
		else
			days += (int)(mount/numPerDay);
		return days;
    }
};
